/*
 * iaperf.h
 *
 *  Created on: Aug 3, 2010
 *      Author: d.buono
 */

#ifndef IAPERF_H_

// IAPERF.H//


#include <stdio.h>
// RDTSC functions

#include "cycle.h"

// The IAperf Macros

#define PERFINITMHZ(clkspd) ticks clocks; \
                            double clockspeed = (unsigned long long)clkspd * 1000000;
#define PERFREPORT fprintf(stderr,"time elapsed = %f sec\n", ((double)clocks)/clockspeed);

#define PERFREPORT2 fprintf(stderr,"cycles elapsed = %li \n", (unsigned long int) clocks );

#define PERFSTART clocks = getticks();
#define PERFSTOP  clocks = getticks() - clocks;


#define IAPERF_H_

#endif /* IAPERF_H_ */
